package com.aat.restful.springmvc.netty;

import java.io.IOException;

import com.aat.restful.springmvc.netty.server.*;

public class Main {

	public static void main(String[] args) throws IOException {
		int port = 8083;
		String charset = "UTF-8";
		String configLocation = "restFulSpringMVC.xml";
		// 从输入参数获取端口和环境配置
		if (args != null && args.length>0) {
			port = Integer.parseInt(args[0]);
		}

		NettyServer server = new NettyServer(port, charset, configLocation.split(","));
		try {
			server.start();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
